package com.itheima.controller.utils;

//作为springmvc的异常处理器

import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class ProjectExceptionAdvice {

    @ExceptionHandler
    public R doException(Exception ex){
//      通知运维
//        添加日志
//        通知开发
        ex.printStackTrace();
        return new  R("服务器异常，请稍后再试！");


    }

}
